:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #0f172a;
  --darker: #0a1120;
  --dark-gray: #1e293b;
  --medium-gray: #334155;
  --light-gray: #64748b;
  --light: #e2e8f0;
  --border: #334155;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --sidebar-width: 280px;
  --header-height: 70px;
  --transition: all 0.3s ease;
  --border-radius: 10px;
  --glow: 0 0 15px rgba(59, 130, 246, 0.5);
}
/*用例页面优化*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}
/* 修复侧边栏与主内容区布局冲突 */
.app-container {
  display: flex;
  min-height: 100vh;
  overflow: hidden; /* 防止内容溢出 */
}
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: var(--transition);
  min-width: 0; /* 解决flex子元素溢出问题 */
}
/* 修复统计卡片布局 */
.grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 固定4列布局，与设计一致 */
  gap: 20px;
  margin-bottom: 30px;
  padding: 0 5px;
}
@media (max-width: 1200px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr); /* 中等屏幕2列 */
  }
}
@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: 1fr; /* 小屏幕1列 */
  }
}
.case-stat-card {
  background: rgba(15, 23, 42, 0.8);
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  align-items: center;
  transition: var(--transition);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.case-stat-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--glow);
  transform: translateY(-3px); /* hover上浮效果 */
}
.case-stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-right: 15px;
  background: rgba(37, 99, 235, 0.2);
  color: var(--primary-light);
}
/* 不同卡片图标颜色区分 */
.case-stat-card:nth-child(2) .case-stat-icon {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}
.case-stat-card:nth-child(3) .case-stat-icon {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}
.case-stat-card:nth-child(4) .case-stat-icon {
  background: rgba(100, 116, 139, 0.2);
  color: var(--light-gray);
}
.case-filter {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
  margin-bottom: 25px;
  flex-wrap: wrap; /* 支持换行，适配小屏幕 */
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-label {
  color: var(--light-gray);
  font-size: 14px;
  white-space: nowrap; /* 标签不换行 */
}
.filter-select {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.7);
  color: var(--light);
  font-size: 14px;
  min-width: 160px;
}
.filter-select:focus {
  border-color: var(--primary);
  box-shadow: var(--glow);
  outline: none;
}
.filter-actions {
  margin-left: auto; /* 右对齐 */
  display: flex;
  gap: 10px;
}
/* 统一按钮样式，修复图片中按钮混乱问题 */
.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.import-export {
  display: flex;
  gap: 12px;
}
.import-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  color: var(--primary-light);
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
}
.import-btn:hover {
  background: rgba(37, 99, 235, 0.2);
  box-shadow: var(--glow);
}
.import-btn input {
  display: none; /* 隐藏原生文件选择框 */
}
/* 表格操作按钮优化 */
.case-actions {
  display: flex;
  gap: 8px;
}
.case-actions .btn-sm {
  width: 32px;
  height: 32px;
  padding: 0; /* 图标按钮仅保留尺寸，无内边距 */
  border-radius: 6px;
}
.case-actions .btn-sm[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  background: transparent;
  border-color: var(--medium-gray);
  color: var(--light-gray);
}

.table tr {
  transition: var(--transition);
}
.table tr:hover {
  background: rgba(37, 99, 235, 0.1);
}
.table td {
  vertical-align: middle; /* 表格内容垂直居中 */
}
/* 修复复选框对齐问题 */
.table th input[type="checkbox"],
.table td input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--primary);
  background: rgba(30, 41, 59, 0.5);
  accent-color: var(--primary);
}
.breadcrumb {
  font-size: 13px;
}
.breadcrumb span:last-child {
  color: var(--primary-light);
  font-weight: 500;
}


body {
  background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
  color: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--light);
}

code, pre {
  font-family: 'Source Code Pro', monospace;
}

/* 布局结构 */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  height: 100vh;
  position: fixed;
  z-index: 100;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

/* 侧边栏头部 */
.sidebar-header {
  height: var(--header-height); /* 与topbar使用相同的高度 */
  padding: 0 30px; /* 与topbar使用相同的左右内边距 */
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.7); /* 与topbar使用相同的背景色透明度 */
}

.logo {
  display: flex;
  align-items: center;
  color: var(--light);
}

.logo i {
  font-size: 24px;
  color: var(--primary-light);
  margin-right: 12px;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
}

/* 侧边栏菜单 */
.sidebar-menu {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
}

/* 自定义滚动条样式 */
/* WebKit浏览器 (Chrome, Safari等) */
.sidebar-menu::-webkit-scrollbar {
  width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.5);
  border-radius: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.3);
  border-radius: 3px;
  transition: var(--transition);
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 0.5);
}

/* Firefox浏览器 */
.sidebar-menu {
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.3) rgba(30, 41, 59, 0.5);
}

.menu-section {
  margin-bottom: 20px;
}

.section-title {
  padding: 0 30px 10px 30px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--light-gray);
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 12px 30px;
  color: var(--light);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.menu-item:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-light);
}

.menu-item.active {
  background: rgba(37, 99, 235, 0.2);
  color: var(--primary-light);
}

.menu-item.active:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
}

.menu-item i {
  font-size: 18px;
  margin-right: 12px;
  width: 24px;
  text-align: center;
}

/* 侧边栏底部 */
.sidebar-footer {
  padding: 20px 30px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(to right, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  margin-right: 12px;
}

.user-info {
  flex: 1;
}

.user-name {
  font-weight: 500;
  color: var(--light);
  margin-bottom: 2px;
}

.user-role {
  font-size: 12px;
  color: var(--light-gray);
}

/* 顶部导航 */
.topbar {
  height: var(--header-height);
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 99;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--light-gray);
}

.breadcrumb a {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  margin: 0 8px;
}

.topbar-actions {
  display: flex;
  align-items: center;
}

.search-bar {
  position: relative;
  margin-right: 20px;
}

.search-bar input {
  padding: 10px 15px 10px 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.5);
  color: var(--light);
  font-size: 14px;
  transition: var(--transition);
  width: 240px;
}

.search-bar input:focus {
  border-color: var(--primary);
  box-shadow: var(--glow);
  outline: none;
}

.search-bar i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--light-gray);
}

.notification {
  position: relative;
  margin-right: 25px;
  font-size: 18px;
  color: var(--light-gray);
  cursor: pointer;
  transition: var(--transition);
}

.notification:hover {
  color: var(--primary-light);
}

.notification .badge {
  position: absolute;
  top: -5px;
  right: -8px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-actions {
  display: flex;
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 41, 59, 0.5);
  color: var(--light);
  margin-left: 10px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.action-btn:hover {
  background: rgba(37, 99, 235, 0.3);
  color: var(--primary-light);
  border-color: var(--primary);
  box-shadow: var(--glow);
}

/* 内容区域 */
.content-wrapper {
  padding: 30px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--light);
  position: relative;
  display: inline-block;
}

.page-title:after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  border-radius: 3px;
}

.page-actions button {
  margin-left: 10px;
}

/* 按钮样式 */
.btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  font-size: 14px;
  background: rgba(30, 41, 59, 0.7);
  color: var(--light);
}

.btn i {
  margin-right: 8px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

.btn-primary {
  background: linear-gradient(to right, var(--primary), var(--primary-dark));
  color: white;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(to right, var(--primary-light), var(--primary));
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary-light);
}

.btn-outline:hover {
  background: rgba(37, 99, 235, 0.2);
}

.btn-success {
  background: linear-gradient(to right, var(--success), #059669);
  color: white;
  border: none;
}

.btn-warning {
  background: linear-gradient(to right, var(--warning), #d97706);
  color: var(--dark);
  border: none;
}

.btn-danger {
  background: linear-gradient(to right, var(--danger), #dc2626);
  color: white;
  border: none;
}

.btn-sm {
  padding: 8px 15px;
  font-size: 13px;
}

/* 卡片样式 */
.card {
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
  margin-bottom: 30px;
  overflow: hidden;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.card:hover {
  border-color: var(--primary);
  box-shadow: var(--card-shadow), var(--glow);
}

.card-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--light);
}

.card-body {
  padding: 25px;
}

/* 网格布局 */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

/* 统计卡片 */
.stat-card, .environment-card {
  background: rgba(15, 23, 42, 0.7);
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
  padding: 25px;
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.stat-card:hover, .environment-card:hover {
  border-color: var(--primary);
  box-shadow: var(--glow);
}

.stat-card {
  display: flex;
  align-items: center;
}

.environment-card {
  overflow: hidden;
  transform: translateY(-5px);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-right: 20px;
  background: rgba(37, 99, 235, 0.2);
  color: var(--primary-light);
}

.stat-info {
  flex: 1;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 5px;
  background: linear-gradient(to right, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  color: var(--light-gray);
  font-size: 14px;
}

/* 表格样式 */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(15, 23, 42, 0.5);
}

.table th {
  background: rgba(30, 41, 59, 0.7);
  padding: 15px 20px;
  text-align: left;
  font-weight: 600;
  color: var(--light);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--light);
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: rgba(37, 99, 235, 0.1);
}

/* 状态标签 */
.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.status-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.status-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.status-info {
  background: rgba(37, 99, 235, 0.15);
  color: var(--primary-light);
}

/* 树状结构 */
.tree-view {
  list-style: none;
  padding-left: 0;
}

.tree-node {
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  transition: var(--transition);
  color: var(--light);
}

.tree-node:hover {
  background: rgba(37, 99, 235, 0.1);
}

.tree-node.active {
  background: rgba(37, 99, 235, 0.2);
  color: var(--primary-light);
  font-weight: 500;
}

.tree-node i, .tree-node .toggle {
  color: var(--light-gray);
}

.tree-node.active i, .tree-node.active .toggle {
  color: var(--primary-light);
}

.tree-node i {
  margin-right: 10px;
  font-size: 16px;
}

.tree-node .toggle {
  margin-right: 10px;
  font-size: 14px;
  width: 20px;
  text-align: center;
}

.tree-children {
  padding-left: 45px;
  display: none;
}

.tree-node.expanded > .tree-children {
  display: block;
}

/* 标签样式 */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  background: rgba(37, 99, 235, 0.2);
  color: var(--primary-light);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.tag i {
  margin-left: 5px;
  cursor: pointer;
  font-size: 10px;
  color: var(--primary-light);
}

/* 选项卡 */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab {
  padding: 12px 25px;
  cursor: pointer;
  font-weight: 500;
  color: var(--light-gray);
  position: relative;
  transition: var(--transition);
}

.tab:hover {
  color: var(--light);
}

.tab.active {
  color: var(--primary-light);
}

.tab.active:after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--accent));
}

/* 环境卡片 */
.environment-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.environment-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--light);
}

.environment-body {
  padding: 20px;
}

.environment-info {
  margin-bottom: 15px;
}

.info-label {
  font-size: 12px;
  color: var(--light-gray);
  margin-bottom: 5px;
}

.info-value {
  font-weight: 500;
  color: var(--light);
}

/* 主内容区域 */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: var(--transition);
}

/* 响应式设计 */
@media (max-width: 992px) {
  .sidebar {
    /* 移除默认隐藏，确保侧边栏始终显示 */
  }
  .main-content {
    margin-left: var(--sidebar-width);
  }
  .toggle-sidebar {
    display: none;
  }
}

.toggle-sidebar {
  display: none;
  margin-right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: var(--light);
}

/* 科技感装饰元素 */
.tech-pattern, .grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.tech-pattern {
  background: 
    radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 20%);
}

.grid-overlay {
  background-image: 
    linear-gradient(rgba(30, 41, 59, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 41, 59, 0.2) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* 测试用例和任务相关样式 */
.test-case-container, .job-container {
  margin-bottom: 20px;
}

.test-case-list, .job-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.test-case-card, .job-card {
  background: var(--dark-gray);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 20px;
  transition: var(--transition);
  cursor: pointer;
}

.test-case-card:hover, .job-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow);
  border-color: var(--primary-light);
}

.test-case-header, .job-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.test-case-header h3, .job-header h3 {
  font-size: 16px;
  margin: 0;
}

.test-case-id, .job-id {
  font-size: 12px;
  color: var(--light-gray);
  background: var(--medium-gray);
  padding: 2px 8px;
  border-radius: 12px;
}

.test-case-description {
  font-size: 14px;
  color: var(--light);
  margin-bottom: 12px;
  line-height: 1.5;
}

.test-case-meta {
  margin-bottom: 16px;
}

.priority {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
}

.priority.high {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.priority.medium {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
  border: 1px solid var(--warning);
}

.priority.low {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  border: 1px solid var(--success);
}

.test-case-actions, .job-actions {
  display: flex;
  gap: 10px;
}

.test-case-actions .btn {
  flex: 1;
  font-size: 14px;
  padding: 8px 12px;
}

.btn-view {
  background: var(--primary);
  color: white;
}

.btn-view:hover {
  background: var(--primary-dark);
}

.btn-run {
  background: var(--success);
  color: white;
}

.btn-run:hover {
  background: #059669;
}

/* 加载状态 */
.loading, .no-data, .error {
  text-align: center;
  padding: 40px 20px;
  color: var(--light-gray);
}

.loading { color: var(--primary-light); }
.error { color: var(--danger); }

/* 测试任务详情 */
.job-info {
  margin-bottom: 12px;
}

.job-status { margin-bottom: 8px; }

.job-time {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--light-gray);
}

.job-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--medium-gray);
  border-radius: 8px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.stat-value {
  font-size: 18px;
  font-weight: 600;
}

.stat-value.passed { color: var(--success); }
.stat-value.failed { color: var(--danger); }
.stat-value.skipped { color: var(--warning); }